%**************************************************************
%
% Reads the values from JL and JG from the file name
% Autor: Carlos Amaral (ceamaral@hotmail.com)
% data: 04/10/2010
%**************************************************************

function [JL_value,JG_value] = find_name(file)

string_aux_JL(1) = file(3);
        string_aux_JL(2) = '.';
        string_aux_JL(3) = file(4);  
        if (6 == findstr(file , 'JG'))    %Treatment for the case that JL = 005
               string_aux_JL(4) = file(5);
               string_aux_JG(1) = file(8);
               string_aux_JG(2) = '.';
               string_aux_JG(3) = file(9);
        else
            string_aux_JG(1) = file(7);  %Treatment for the other JLs
            string_aux_JG(2) = '.';
            string_aux_JG(3) = file(8);
        end        
        JL_value = str2num(string_aux_JL);                 %Convert JLs from string to numbers 
        JG_value = str2num(string_aux_JG);    
        
return